import 'dart:collection';

class ClubCenterModel {
  List<ClubMatchInfoVOS>? clubMatchInfoVOS;
  int? matchCount;
  int? playerNum;
  int? liveness;
  int? checkMessageNum;
  String? userRoleCode;
  String? userRoleName;
  String? clubName;
  String? clubAvatar;
  int? clubId;
  String? clubRegionCode;
  String? bulletin;

  ClubCenterModel(
      {this.clubMatchInfoVOS,
      this.matchCount,
      this.playerNum,
      this.liveness,
      this.checkMessageNum,
      this.userRoleCode,
      this.userRoleName,
      this.clubName,
      this.clubAvatar,
      this.clubId,
      this.clubRegionCode,
      this.bulletin});

  ClubCenterModel.fromJson(Map<String, dynamic> json) {
    if (json['clubMatchInfoVOS'] != null) {
      clubMatchInfoVOS = <ClubMatchInfoVOS>[];
      json['clubMatchInfoVOS'].forEach((v) {
        if (v != null) {
          clubMatchInfoVOS!.add( ClubMatchInfoVOS.fromJson(v));
        }
      });
    }
    matchCount = json['matchCount'];
    playerNum = json['playerNum'];
    liveness = json['liveness'];
    checkMessageNum = json['checkMessageNum'];
    userRoleCode = json['userRoleCode'];
    userRoleName = json['userRoleName'];
    clubName = json['clubName'];
    clubAvatar = json['clubAvatar'];
    clubId = json['clubId'];
    clubRegionCode = json['clubRegionCode'];
    bulletin = json['bulletin'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = HashMap();
    if (clubMatchInfoVOS != null) {
      data['clubMatchInfoVOS'] =
          clubMatchInfoVOS!.map((v) => v.toJson()).toList();
    }
    data['matchCount'] = matchCount;
    data['playerNum'] = playerNum;
    data['liveness'] = liveness;
    data['checkMessageNum'] = checkMessageNum;
    data['userRoleCode'] = userRoleCode;
    data['userRoleName'] = userRoleName;
    data['clubName'] = clubName;
    data['clubAvatar'] = clubAvatar;
    data['clubId'] = clubId;
    data['clubRegionCode'] = clubRegionCode;
    data['bulletin'] = bulletin;
    return data;
  }
}

class ClubMatchInfoVOS {
  int? matchId;
  String? courtName;
  String? matchTime;
  String? siteFees;
  String? matchRulesValue;
  String? matchRulesName;
  int? matchNumberParticipants;
  String? isPunishment;
  int? signUpUserNum;
  bool? isFull;
  bool? normalCancellation;
  bool? isSignUp;
  bool? isPay;

  ClubMatchInfoVOS(
      {this.matchId,
      this.courtName,
      this.matchTime,
      this.siteFees,
      this.matchRulesValue,
      this.matchRulesName,
      this.matchNumberParticipants,
      this.isPunishment,
      this.signUpUserNum,
      this.isFull,
      this.normalCancellation,
      this.isSignUp,
      this.isPay});

  ClubMatchInfoVOS.fromJson(Map<String, dynamic> json) {
    matchId = json['matchId'];
    courtName = json['courtName'];
    matchTime = json['matchTime'];
    siteFees = json['siteFees'];
    matchRulesValue = json['matchRulesValue'];
    matchRulesName = json['matchRulesName'];
    matchNumberParticipants = json['matchNumberParticipants'];
    isPunishment = json['isPunishment'];
    signUpUserNum = json['signUpUserNum'];
    isFull = json['isFull'];
    normalCancellation = json['normalCancellation'];
    isSignUp = json['isSignUp'];
    isPay = json['isPay'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = HashMap();
    data['matchId'] = matchId;
    data['courtName'] = courtName;
    data['matchTime'] = matchTime;
    data['siteFees'] = siteFees;
    data['matchRulesValue'] = matchRulesValue;
    data['matchRulesName'] = matchRulesName;
    data['matchNumberParticipants'] = matchNumberParticipants;
    data['isPunishment'] = isPunishment;
    data['signUpUserNum'] = signUpUserNum;
    data['isFull'] = isFull;
    data['normalCancellation'] = normalCancellation;
    data['isSignUp'] = isSignUp;
    data['isPay'] = isPay;
    return data;
  }
}